package com.one.group.service;

import lombok.extern.slf4j.Slf4j;
import org.apache.dubbo.config.annotation.DubboReference;
import org.springframework.ai.tool.annotation.Tool;
import org.springframework.stereotype.Service;

@Service
@Slf4j
public class HouseMcpService {
    @DubboReference
    private SpHouseRentalService spHouseRentalService;
    @DubboReference
    private SpHouseService spHouseService;
    @DubboReference
    private SpCellService spCellService;
    @Tool(description = "查询所有小区信息")
    public String queryCellInfo() {
        return spCellService.getAllCell();
    }
    @Tool(description = "查询房屋租赁公告信息")
    public String queryHouseRentInfo(Long cellId) {
        return spHouseRentalService.queryHouseRentInfo(cellId);
    }
    @Tool(description = "查询房屋信息")
    public String queryHouseInfo(Long houseId) {
        return spHouseService.myGetById(houseId);
    }
    @Tool(description = "租房请求邮件")
    public String houseRentRequest(String message, Long ownerId) {
        return spHouseService.sendMail(message, ownerId);
    }
}
